import axios from "axios";
import {getToken} from "./cook"
let server = axios.create({
    baseURL: "/",
    timeout: 5000,
})

server.interceptors.request.use(config => {
    config.headers['my-token'] = getToken('token')
    return config
})

server.interceptors.response.use(config => {
    
    return config.data

})

export default server